<template>
    <div class="newObjectList">
        <div class="container">
            <div class="handle-box">
                <div class="title">新项目</div>
                <el-button type="primary" class="titleBtn addbtn" icon="el-icon-plus" style="width:86px;" @click="addNewObject"
                    >新建</el-button
                >
                <!-- <a href="/cost/excel/project/new"> -->
                <el-button type="primary" class="titleBtn1 reportBtn" @click="toexel">导出</el-button>
                <!-- </a> -->
                <div class="prjectName mr20">
                    <span class="name">项目名称</span>
                    <el-input class="handle-select mr10" placeholder="请输入" v-model="query.name"></el-input>
                </div>
                <div class="prjectName mr20">
                    <span class="name">项目类型</span>
                    <el-cascader
                        class="handle-select mr10"
                        v-model="category"
                        :options="options"
                        :props="{ expandTrigger: 'hover' }"
                        @change="handleChange"
                    ></el-cascader>
                </div>
                <div class="stateTime mr20">
                    <span class="name" style="padding-left:17px;">开始时间</span>
                    <el-date-picker
                        class="handle-select"
                        v-model="query.startTime"
                        type="date"
                        placeholder="请选择"
                        value-format="yyyy-MM-dd"
                    ></el-date-picker>
                </div>
                <div class="searchBox">
                    <el-button class="titleBtn" type="primary" style="width:90px;margin-left:40px" @click="handleSearch">查询</el-button>
                    <el-button class="titleBtn1" type="primary" style="width:90px;margin-left:40px" @click="reset">重置</el-button>
                </div>
            </div>

            <el-table
                :data="tableData"
                border
                stripe
                class="table"
                ref="multipleTable"
                header-cell-class-name="table-header"
                empty-text="暂无数据"
            >
                <el-table-column label="序号" width="55" align="center">
                    <template slot-scope="scope">{{ scope.$index + 1 }}</template>
                </el-table-column>
                <el-table-column prop="projectid" label="项目ID" :show-overflow-tooltip="true" align="center"></el-table-column>
                <el-table-column prop="projectname" label="项目名称" :show-overflow-tooltip="true" align="center"></el-table-column>
                <el-table-column label="合同总产值" align="center">
                    <template slot-scope="scope">{{ scope.row.contractvalue }}万</template>
                </el-table-column>
                <el-table-column prop="deptName" label="所属事业部" :show-overflow-tooltip="true" align="center"></el-table-column>
                <el-table-column prop="startdate" label="开工时间" align="center"></el-table-column>
                <el-table-column label="工期" align="center">
                    <template slot-scope="scope">{{ scope.row.period }}个月</template>
                </el-table-column>
                <el-table-column prop="category" label="项目类型" :show-overflow-tooltip="true" align="center"></el-table-column>
                <el-table-column prop="region" label="区域(省)" align="center"></el-table-column>
                <el-table-column prop="state" label="实施状态" :formatter="isState" align="center"></el-table-column>
                <el-table-column label="预算金额" align="center">
                    <template slot-scope="scope" v-if="scope.row.budgetAmount">{{ scope.row.budgetAmount }}万</template>
                    <template slot-scope="scope" v-else>{{ scope.row.budgetAmount }}</template>
                </el-table-column>
                <!-- <el-table-column label="承包额" align="center">
                    <template slot-scope="scope">{{ scope.row.contractvalue }}万</template>
                </el-table-column> -->
                <el-table-column label="操作" align="center" width="260">
                    <template slot-scope="scope">
                        <el-button type="text" @click="decomposeEdit(scope.$index, scope.row)">细化分解</el-button>
                        <el-button type="text" @click="handleDelete(scope.$index, scope.row)">新建确认</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <div class="pagination">
                <el-pagination
                    background
                    layout="prev, pager, next"
                    :current-page="query.page"
                    :page-size="pageSize"
                    :total="pageTotal"
                    @current-change="handlePageChange"
                ></el-pagination>
            </div>
        </div>

        <el-dialog title="新建项目" :visible.sync="addVisible" width="590px">
            <el-form class="newForm" ref="form" :model="form" label-position="left" label-width="100px">
                <el-form-item label="项目ID" style="padding-top:34px">
                    <el-input
                        placeholder="请输入"
                        disabled
                        class="newFormInput"
                        v-model="form.projectid"
                        style="background-color:#fff"
                    ></el-input>
                </el-form-item>
                <el-form-item label="项目名称">
                    <el-input placeholder="请输入" class="newFormInput" v-model.trim="form.projectname" maxlength="200"></el-input>
                </el-form-item>
                <el-form-item label="登录密码">
                    <el-input placeholder="请输入" class="newFormInput" v-model="form.password" maxlength="20"></el-input>
                </el-form-item>
                <el-form-item label="区域（省）">
                    <el-select class="newFormInput" v-model="form.region" placeholder="请选择" @click="getRegion">
                        <el-option v-for="item in regions" :key="item.id" :label="item.areaName" :value="item.areaName"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="项目类型">
                    <el-cascader
                        class="newFormInput"
                        v-model="form.category"
                        :options="options"
                        :props="{ expandTrigger: 'hover' }"
                    ></el-cascader>
                </el-form-item>
                <el-form-item label="合同产值">
                    <el-input
                        placeholder="请输入"
                        class="newFormInput"
                        v-model.number="form.contractvalue"
                        maxlength="15"
                        oninput="value=value.replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, '$1$2.$3').replace(/\./, '#').replace(/\./g, '').replace('#', '.')"
                    >
                        <template slot="suffix">万元</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="预算金额">
                    <el-input
                        placeholder="请输入"
                        class="newFormInput"
                        v-model.number="form.budgetAmount"
                        maxlength="15"
                        oninput="value=value.replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, '$1$2.$3').replace(/\./, '#').replace(/\./g, '').replace('#', '.')"
                    >
                        <template slot="suffix">万元</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="所属事业部">
                    <el-select class="newFormInput" v-model="form.deptid" placeholder="请选择" @click="getAddSelectedDep">
                        <el-option v-for="item in depOptions" :key="item.deptid" :label="item.deptname" :value="item.deptid"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="开工时间">
                    <el-date-picker
                        border="none"
                        class="handle-date-picker"
                        v-model="form.startdate"
                        type="date"
                        value-format="yyyy-MM-dd"
                        format="yyyy.MM.dd"
                        placeholder="请选择"
                    ></el-date-picker>
                </el-form-item>
                <el-form-item label="项目工期">
                    <el-input
                        placeholder="请输入"
                        class="newFormInput"
                        v-model.number="form.period"
                        maxlength="5"
                        @keyup.native="changePeriod"
                    >
                        <template slot="suffix">个月</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="上报时间">
                    <el-select class="newFormInput" v-model="form.reportday" placeholder="请选择">
                        <el-option v-for="num in 31" :key="num" :label="`每月 ${num} 日`" :value="num"></el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <div class="tableBtnBox" style="margin:40px 0 30px">
                <button class="btn1" @click="cancelAdd">取消</button>
                <button class="btn2" @click="addConfirm">确认</button>
            </div>
        </el-dialog>

        <!-- 细化分表弹框 -->
        <div class="specity1">
            <el-dialog title="细化分解" :visible.sync="decomposeVisible" @close="decomposeCancle" width="590px" class="specityBox">
                <div class="tableBox">
                    <el-select v-model="value" placeholder="请选择" class="select" @change="getdetail">
                        <el-option v-for="item in templatelist" :key="item.id" :label="item.modelName" :value="item.id"> </el-option>
                    </el-select>
                    <el-table
                        :data="stu"
                        style="width: 100%;margin-bottom: 20px;"
                        row-key="id"
                        border
                        default-expand-all
                        :tree-props="{ children: 'modelList', hasChildren: 'hasChildren' }"
                    >
                        <el-table-column label="分类名称" width="220" style="text-align:left;">
                            <template slot-scope="scope">
                                <span style="margin-left: 10px">{{
                                    scope.row.oneLevelName || scope.row.twoLevelName || scope.row.threeLevelName
                                }}</span>
                            </template>
                        </el-table-column>
                        <el-table-column label="预算金额">
                            <template slot-scope="scope">
                                <input
                                    class="td-input"
                                    v-model="scope.row.budgetAmount"
                                    oninput="value=value.replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/\./, '#').replace(/\./g, '').replace('#', '.')"
                                    maxlength="200"
                                />
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <div class="tableBtnBox">
                    <button class="btn1" @click="decomposeCancle">清除</button>
                    <button class="btn2" @click="decomposeConfirm">确认</button>
                </div>
            </el-dialog>
        </div>
    </div>
</template>

<script>
import axios from 'axios';
import {
    projectadd, //新增项目
    projectlist, //获取项目列表
    commongetDepartmentList, //获取部门列表
    commonareaList, //获取地址列表
    findAll,
    commoncreateProjectId, //获取项目id
    delectObject, //删除项目
    commongetCategoryList, //获取所有项目的分类
    getModelList, //获取所有模板列表
    modeldetail, //获取模板详情
    projectdecomposition, //细化分解
    projectconfirm, //新建确认
    excelprojectnew,
    commonjudgeExportRole,
    savePreSpecify
} from '../../api/index';
import { throttle } from '@/utils/tools.js';
export default {
    name: 'basetable',
    data() {
        return {
            user: { orderNo: '', subitem: '', quantity: '', price: '', coefficient: '' }, //细化分解添加项
            stu: [], //细化分解列表数据
            query: {
                page: 1,
                type: 0
            }, //搜索参数
            category: '', //项目类型数据
            regions: [], //地址列表
            depOptions: [], //事业部列表
            pageTotal: 0,
            pageSize: 10,
            tableData: [], //项目列表数据

            //细化分解表格
            multipleSelection: [],
            addVisible: false, //新增项目弹窗
            decomposeVisible: false, //细化分解弹框
            form: {
                projectid: '', //项目id
                projectname: '', //项目名称
                password: '123456',
                region: '',
                contractvalue: '', //合同总产值
                deptid: '', //所属事业部
                startdate: '',
                period: '',
                reportday: '',
                budgetAmount: '',
                category: '' //项目类型
            },
            templatelist: [], //模板列表
            value: '',
            options: [], //项目类型
            projectid: '' //项目id
        };
    },
    created() {
        // 获取地址列表
        this.getRegions();
        // 获取项目列表数据
        this.getData();
        // 获取事业部列表
        this.getDepList();
    },
    mounted() {
        // 获取所有项目的分类
        this.getAllCategory();
    },
    methods: {
        // 导出项目
        toexel() {
          commonjudgeExportRole({type:0}).then(res=>{
            if(res.code==200){
              axios
                .get(`/cost/excel/project/new`, {
                    headers: {
                        Authorization: `${localStorage.getItem('token')}`
                    },
                    responseType: 'blob'
                })
                .then(result => {
                    // 文件下载
                    const blob = new Blob([result.data], {
                        type: 'application/vnd.ms-excel'
                    });
                    let link = document.createElement('a');
                    link.href = URL.createObjectURL(blob);
                    link.setAttribute('download', '项目成本导出表.xlsx');
                    link.click();
                    link = null;
                })
                .catch(err => {
                    reject(err);
                });
            }else{
              this.$message.success(res.message);
            }
          })
        },
        // 获取列表数据
        getData() {
            projectlist(this.query).then(res => {
                if (res.code === 200) {
                    if (res.result.projectList) {
                        this.tableData = res.result.projectList;
                        this.query.page = res.result.pageInfo.current;
                        this.pageTotal = res.result.pageInfo.total;
                    } else {
                        this.tableData = [];
                        this.query.page = 1;
                        this.pageTotal = 0;
                    }
                } else {
                    this.$message.error(res.message);
                    this.tableData = [];
                    this.query.page = 0;
                    this.pageTotal = 0;
                }
            });
        },
        //获取部门
        getDepList() {
            commongetDepartmentList().then(res => {
                if (res.code === 200) {
                    this.depOptions = res.result;
                }
            });
        },
        //获取地址列表
        getRegions() {
            let param = {
                areaType: 1
            };
            commonareaList(param).then(res => {
                if (res.code === 200) {
                    this.regions = res.result;
                } else this.$message.error(res.message);
            });
        },
        //获取当前时间并处理
        getTime() {
            let now = new Date();
            let year = now.getFullYear(); //得到年份
            let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : '0' + (now.getMonth() + 1); //得到月份
            return year + month;
        },
        //格式化实施状态
        isState(scope) {
            if (scope.state === '0') {
                return '新项目';
            } else if (scope.state === 1) {
                return '进行中';
            } else {
                return '已完成';
            }
        },
        // 触发搜索按钮
        handleSearch() {
            this.query.page = 1;
            this.getData();
        },
        //获取选中的key
        getQuerySelectedDep(item) {
            this.query.deptid = item;
        },
        // 点击新建确认操作
        handleDelete(index, row) {
            // 二次确认创建
            this.$confirm(`确定执行【` + row.projectname + `】后，将转移到进行中项目模块？`, {
                customClass: 'newObjectConfirm',
                center: true,
                showClose: false,
                cancelButtonClass: 'newObjectCancel',
                confirmButtonClass: 'newObjectConfirm'
            })
                .then(() => {
                    projectconfirm({ projectid: row.projectid }).then(res => {
                        if (res.code === 200) {
                            row.state = 1;
                            this.$message.success('新建成功');
                            this.getData();
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                })
                .catch(() => {});
        },

        // 分页导航
        handlePageChange(val) {
            this.query.page = val;
            this.getData();
        },
        //点击重置
        reset() {
            (this.query = {
                page: 1,
                type: 0,
                name: '',
                startdate: '',
                categoryId: ''
            }),
                (this.category = '');
            this.getData();
        },
        //点击新建项目
        addNewObject() {
            commoncreateProjectId().then(res => {
                if (res.code === 200) {
                    this.form.projectid = res.result;

                    this.addVisible = true;
                } else {
                    this.$message.error(res.message);
                }
            });
            this.getAllCategory();
        },
        //点击项目弹框确认按钮
        addSave() {
            this.addVisible = false;
        },
        //细化分解操作
        decomposeEdit(index, row) {
            this.projectid = row.projectid;
            if (row.modelId) {
                this.value = row.modelId;
                this.getdetail();
            } else {
                this.value = '';
            }
            getModelList().then(res => {
                if (res.code == 200) {
                    this.templatelist = res.result;
                    this.decomposeVisible = true;
                }
            });
        },
        // 获取模板详情
        getdetail() {
            modeldetail({ id: this.value, projectid: this.projectid }).then(res => {
                if (res.code == 200) {
                    if (res.result.modelList) {
                        res.result.modelList.forEach(item => {
                            if (item.budgetAmount) {
                                item.budgetAmount = item.budgetAmount;
                            } else {
                                item.budgetAmount = '';
                            }
                        });
                        this.stu = res.result.modelList;
                    } else this.$message.error(res.message);
                }
            });
        },

        //细化分表弹出后点击确认
        decomposeConfirm(index, row) {
            let arr = [];
            this.stu.forEach(item => {
                let obj = {};
                obj.id = item.id;
                obj.cost = item.budgetAmount;
                arr.push(obj);
                if (item.modelList) {
                    item.modelList.forEach(items => {
                        let obj1 = {};
                        obj1.id = items.id;
                        obj1.cost = items.budgetAmount;
                        arr.push(obj1);
                        if (items.modelList) {
                            items.modelList.forEach(itemss => {
                                let obj2 = {};
                                obj2.id = itemss.id;
                                obj2.cost = itemss.budgetAmount;
                                arr.push(obj2);
                            });
                        }
                    });
                }
            });
            // console.log(arr)
            let data = {
                projectid: this.projectid,
                modelId: this.value,
                specify: arr
            };
            projectdecomposition(data).then(res => {
                if (res.code == 200) {
                    this.$message.success('细化分解成功');
                    this.getData();
                    this.decomposeVisible = false;
                } else {
                    this.$message.error(res.message);
                }
            });
        },
        unique(arr) {
            const res = new Map();
            return arr.filter(arr => !res.has(arr.id) && res.set(arr.id, 1));
        },
        //点击细化分解取消
        decomposeCancle() {
            this.stu = [];
        },
        //获取新增项目时选用的事业部
        getAddSelectedDep(item) {
            this.form.deptid = item;
        },
        //获取新增项目时选用区域
        getRegion(item) {
            this.from.region = item;
        },
        //新建点击确认
        addConfirm: throttle(function() {
            let form = {
                projectid: this.form.projectid, //项目id
                projectname: this.form.projectname, //项目名称
                password: this.$md5(this.form.password),
                region: this.form.region,
                categoryId: this.form.category[1],
                contractvalue: this.form.contractvalue, //合同总产值
                deptid: this.form.deptid, //所属事业部
                startdate: this.form.startdate,
                period: this.form.period,
                reportday: this.form.reportday,
                budgetAmount: this.form.budgetAmount
            };

            //项目名称
            if (form.projectname == '请输入' || form.projectname == '') {
                this.$message.error('项目名称不能为空');
                return;
            }
            //区域(省)
            if (form.region == '请输入' || form.region == '') {
                this.$message.error('区域（省）不能为空');
                return;
            }
            //项目类型
            if (!form.categoryId) {
                this.$message.error('项目类型不能为空');
                return;
            }
            //项目类型
            if (form.category == '请输入' || form.category == '') {
                this.$message.error('项目类型不能为空');
                return;
            }
            //合同产值
            if (form.contractvalue == '请输入' || form.contractvalue == 0) {
                this.$message.error('无效合同产值');
                return;
            }
            //预算金额
            if (form.budgetAmount == '请输入' || form.budgetAmount == 0) {
                this.$message.error('无效预算金额');
                return;
            }
            //所属事业部
            if (form.deptid == '请输入' || form.deptid == '') {
                this.$message.error('事业部不能为空');
                return;
            }
            //开工时间
            if (form.startdate == '请输入' || form.startdate == '' || form.startdate == null) {
                this.$message.error('开工时间不能为空');
                return;
            }
            console.log(form.period);
            //项目工期
            if (form.period == '') {
                if (form.period === 0) {
                    this.$message.error('项目工期不能为0');
                    return;
                } else {
                    this.$message.error('项目工期不能为空');
                    return;
                }
            }
            //上报时间
            if (form.reportday == '请选择' || form.reportday == '') {
                this.$message.error('上报时间不能为空');
                return;
            }
            //判断预算金额是否大于等于合同产值
            // console.log(typeof(form.budgetAmount))
            if (form.budgetAmount >= form.contractvalue) {
                this.form.budgetAmount = '';
                this.$message.error('预算金额不能大于等于合同产值');
                return;
            }
            // console.log(form);
            projectadd(form).then(res => {
                if (res.code === 200) {
                    this.$message.success('新建成功');
                    this.query.page = 1;
                    this.getData();
                    this.addVisible = false;
                    this.form = {
                        projectid: '', //项目id
                        projectname: '', //项目名称
                        password: '123456',
                        region: '',
                        budgetAmount: '', // 预算金额
                        contractvalue: '', //合同总产值
                        deptid: '', //所属事业部
                        startdate: '',
                        period: ''
                        // reportday: ''
                    };
                } else {
                    this.$message({
                        type: 'error',
                        message: res.message
                    });
                }
            });
        }, 3000),
        //删除项目
        deleteproject(scope) {
            this.$confirm('是否删除项目', {
                customClass: 'newObjectConfirm',
                center: true,
                showClose: false,
                cancelButtonClass: 'newObjectCancel',
                confirmButtonClass: 'newObjectConfirm'
            })
                .then(() => {
                    delectObject({ projectid: scope.projectid }).then(res => {
                        if (res.code == 200) {
                            this.$message.success('项目删除成功');
                            this.getData();
                        } else this.$message.error(res.message);
                    });
                })
                .catch(() => {});
        },
        //取消新增
        cancelAdd() {
            this.addVisible = false;
            this.form = {
                projectid: '', //项目id
                projectname: '', //项目名称
                password: '123456',
                region: '',
                contractvalue: '', //合同总产值
                deptid: '', //所属事业部
                startdate: '',
                period: '',
                reportday: ''
            };
        },

        //处理合同产值的格式
        changeContractvalue() {
            this.$nextTick(() => {
                if (this.form.contractvalue !== null) {
                    this.form.contractvalue = this.form.contractvalue.replace(/\.{2,}/g, '.'); //只保留第一个. 清除多余的
                    this.form.contractvalue = this.form.contractvalue.replace(/[^\d+(\.\d{0,6})?$]/g, '');
                }
            });
        },
        //处理工期的格式
        changePeriod() {
            this.$nextTick(() => {
                if (this.form.period !== null) {
                    this.form.period = this.form.period.replace(/[^\d]/g, '');
                }
            });
        },
        //处理数量格式
        changeNum() {
            this.$nextTick(() => {
                if (this.user.quantity !== null) {
                    alert(this.user.quantity);
                    if (this.user.quantity < 0) {
                        this.user.quantity = 0;
                    }
                }
            });
        },
        //处理单价个数
        changePrice() {
            this.$nextTick(() => {
                if (this.user.price !== null) {
                    this.user.price = this.user.price.replace(/\D/g, '');
                }
            });
        },
        // 选择项目类型
        handleChange(value) {
            (this.query.classifyId = value[0]), (this.query.categoryId = value[1]);
        },
        //取所有项目的分类
        getAllCategory() {
            commongetCategoryList({}).then(res => {
                if (res.code == 200) {
                    this.options = res.result;
                    this.options.filter((item, index) => {
                        item.value = item.id;
                        item.label = item.name;
                        item.children = item.categoryList;
                        item.children.filter((item, index) => {
                            item.value = item.id;
                            item.label = item.name;
                        });
                    });
                } else {
                    this.$message.error(message);
                }
            });
        },
    }
};
</script>

<style scoped lang="scss">
.container {
    box-shadow: none;
    margin-top: 0;
}
.handle-box {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.title {
    height: 28px;
    line-height: 28px;
    font-size: 20px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: rgba(51, 51, 51, 1);
    margin-right: 8px;
    min-width: 60px;
}
.titleBtn {
    background: rgba(33, 74, 143, 1);
    color: #fff;
    border: none;
    font-size: 16px;
    border-radius: 5px;
    height: 35px;
}
.addbtn {
    margin-left: 7.875rem /* 126/16 */;
    text-align: center;
}
.titleBtn1 {
    background: rgba(0, 79, 171, 0.2);
    color: rgba(0, 79, 171, 1);
    border: none;
    font-size: 16px;
    border-radius: 5px;
    height: 35px;
}
.titleBtn1 a {
    color: #004fab;
}
.select {
    margin-bottom: 1.25rem /* 20/16 */;
}
.reportBtn {
    width: 90px;
    margin-right: 10px;
    margin-left: 3rem /* 48/16 */;
}
.handle-box .name {
    margin-right: 10px;
    margin-left: 1.25rem /* 20/16 */;
}
.mr0 {
    font-size: 14px;
    min-width: 230px;
}
.mr20 {
    font-size: 14px;
    min-width: 223px;
}
.handle-select {
    width: 140px;
}
.searchBox {
    min-width: 220px;
    white-space: nowrap;
}
.handle-input {
    width: 300px;
    display: inline-block;
}
.table {
    width: 100%;
    font-size: 14px;
}
.title {
    float: left;
}
.red {
    color: #ff0000;
}
.mr10 {
    margin-right: 10px;
}
.table-td-thumb {
    display: block;
    margin: auto;
    width: 40px;
    height: 40px;
}
/* 弹出框样式 */
.td-input {
    width: 100px;
    border: none;
    height: 40px;
    text-align: center;
}
.tableTitle {
    background: rgba(184, 216, 255, 0.2);
    border: 1px solid rgba(184, 216, 255, 1);
    margin: 0;
    min-width: 100px;
    height: 40px;
}
.newObjectList >>> .el-dialog__body {
    padding: 0 0px 30px 30px;
}
.tr1 {
    height: 40px;
}
.tr1 input {
    height: 30px;
}
.tr2 {
    height: 40px;
    background: rgba(184, 216, 255, 0.05);
}
.tr2 input {
    background: transparent;
    height: 30px;
}
/* .addListBtn{
} */
.newObjectConfirm {
    font-size: 16px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: rgba(255, 255, 255, 1);
    line-height: 28px;
    background: rgba(0, 79, 171, 1) !important;
    padding-bottom: 1.25rem /* 20/16 */;
}
.newObjectCancel {
    width: 90px !important;
    height: 35px;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 5px;
    padding-bottom: 1.25rem /* 20/16 */;
}
#table {
    border-collapse: collapse;
}
#table td {
    border: 1px solid rgba(184, 216, 255, 1);
}
.m1 {
    min-width: 40px;
    width: 40px;
}
.tableBtnBox {
    margin-top: 64px;
    text-align: center;
    .btn1 {
        width: 90px;
        height: 35px;
        background: rgba(0, 79, 171, 0.2);
        border-radius: 5px;
        border: none;
        font-size: 16px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: rgba(0, 79, 171, 1);
        margin-right: 56px;
    }
    .btn2 {
        width: 90px;
        height: 35px;
        background: rgba(0, 79, 171, 1);
        border-radius: 5px;
        border: none;
        font-size: 16px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: rgba(255, 255, 255, 1);
    }
}
.newForm {
    .el-form-item {
        border-bottom: 1px solid #d8d8d8;
    }
    .newFormInput/deep/.el-input__inner {
        border: none;
        width: 450px;
    }
    /deep/.el-icon-arrow-up:before {
        display: inline-block;
        width: 8px;
        height: 5px;
    }
}
.newObjectList/deep/.el-dialog__header {
    background: rgba(33, 74, 143, 0.1);
    font-size: 18px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: rgba(33, 74, 143, 1);
}
.newObjectList/deep/.el-dialog__body {
    max-height: 720px;
    position: relative;
}
.newObjectList/deep/.el-icon-close:before {
    border-radius: 50%;
    color: #fff;
    background-color: rgba(33, 74, 143, 1);
}
.newObjectList/deep/.el-input__inner {
    color: rgba(153, 153, 153, 1);
    height: 35px;
}
.newObjectList/deep/.el-form-item__label {
    color: #333;
    font-size: 16px;
}
.handle-date-picker {
    width: 100%;
    border: none;
}
.newForm/deep/.el-input__inner {
    border: none;
}
.newForm /deep/.el-icon-date:before {
    content: none;
}
.newForm /deep/.el-input--prefix .el-input__inner {
    padding-left: 15px;
}
.specityBox {
    .tableBox {
        max-height: 452px;
        overflow-y: scroll;
    }
    .tableBox::-webkit-scrollbar {
        width: 0;
    }
}
.specity1/deep/.el-dialog__body {
    // padding: 30px 0 20px 20px;
    padding-bottom: 64px;
}
.progress/deep/.el-progress__text {
    width: 100% !important;
}

input[type='number'] {
    -moz-appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
// /deep/.el-table th > .cell {
//     text-align: center;
// }
// /deep/.el-table .cell {
//     text-align: center;
// }
</style>
